<template>
  <div ref="myDiv" class="radar-echart" />
</template>

<script>
import { getAreaUseStatus } from '@/api/dashboard'
const echarts = require('echarts/lib/echarts')
require('echarts/lib/component/legend')
require('echarts/lib/chart/pie')
export default {
  created () {
    getAreaUseStatus()
  },
  mounted () {
    const chart = echarts.init(this.$refs.myDiv)
    chart.setOption({
      legend: {
        orient: 'vertical',
        right: '50px',
        top: 'center'
      },
      series: [
        {
          name: 'Access From',
          type: 'pie',
          radius: '50%',
          data: [
            { value: 1048, name: '拣货区' },
            { value: 735, name: '出库区' },
            { value: 580, name: '暂存库区' },
            { value: 484, name: '进货暂存区' },
            { value: 300, name: '出货暂存区' }
          ]
        }
      ]
    }
    )
  }
}
</script>

<style scoped>
.radar-echart {
    width: 800px;
    height: 280px;
}
</style>
